<%--
  Created by IntelliJ IDEA.
  User: apple
  Date: 2020/6/18
  Time: 11:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@include file="header.jsp"%>

<!--/sidebar-->
<div class="main-wrap">

    <div class="crumb-wrap">
        <div class="crumb-list"><i class="icon-font"></i><a href="index.jsp">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">作品管理</span></div>
    </div>
    <div class="search-wrap">
        <div class="search-content">
            <form action="#" method="post">
                <table class="search-tab">
                    <tr>
                        <th width="160">当前在线人数:${num}人</th>
                    </tr>
                </table>
            </form>
        </div>
    </div>
    <div class="result-wrap">
        <div class="result-title">
            <div class="result-list">
                <a href="userarticlesadd.jsp"><i class="icon-font"></i>添加作品</a>
<%--                <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i>批量删除</a>--%>
<%--                <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>--%>
            </div>
        </div>
        <div class="result-content">
            <table class="result-tab" width="100%">
                <tr>
                    <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox"></th>
                    <%--                        <th>排序</th>--%>
                    <th>ID</th>
                    <th>标题</th>
                    <%--                        <th>审核状态</th>--%>
                    <%--                        <th>点击</th>--%>
                    <th>发布人</th>
                    <th>更新时间</th>
                    <th>评论</th>
                    <th>操作</th>
                </tr>
                <c:forEach items="${userpage.records}" var="n" varStatus="count">
                    <tr>
                        <td class="tc"><input name="id[]" value="59" type="checkbox"></td>
                            <%--                                <td>--%>
                            <%--                                    <input name="ids[]" value="59" type="hidden">--%>
                            <%--&lt;%&ndash;                                    <input class="common-input sort-input" name="ord[]" value="0" type="text">&ndash;%&gt;--%>
                            <%--                                </td>--%>
                        <td><input type="text" value="${n.id}" disabled="true" style="width: 35px"></td>
                        <td title="发哥经典"><a target="_blank" href="/webtest/Homework/Qiantai/articles?action=page&id=${n.id}" title="发哥经典">${n.title}</a></td>
                            <%--                                <td>0</td>--%>
                            <%--                                <td>2</td>--%>
                        <td>${n.writter}</td>
                        <td>${n.updatetime}</td>
                        <td></td>
                        <td>
                            <a class="link-update" href="${pageContext.request.contextPath }/Homework/manage/articles?action=update&id=${n.id}&writter=${n.writter}">修改</a>
                            <a class="link-update" href="${pageContext.request.contextPath }/Homework/manage/articles?action=delete&id=${n.id}&writter=${n.writter}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
            </table>
            <c:forEach items="${userpage.records}" var="n" begin="1" end="1">
                <div class="list-page">
                    <span><a href="${pageContext.request.contextPath }/Homework/manage/articles?action=userpage&currPage=1&writter=${n.writter}">首页</a></span>
                    <span style="margin-left: 10px;margin-right: 10px"><a href="${pageContext.request.contextPath }/Homework/manage/articles?action=userpage&currPage=${userpage.currpage-1<=0?1:userpage.currpage-1}&writter=${n.writter}"
                                                                          aria-label="Previous"> <span aria-hidden="true">&laquo;</span></a></span>

                    <c:forEach begin="${userpage.currpage}" end="${userpage.totalpage}" var="num">
                        <span style="margin-right: 5px"><a href="${pageContext.request.contextPath }/Homework/manage/articles?action=userpage&currPage=${num}&writter=${n.writter}">${num}</a></span>
                    </c:forEach>
                    <span><a href="${pageContext.request.contextPath }/Homework/manage/articles?action=userpage&currPage=${userpage.currpage+1 <= userpage.totalpage?userpage.currpage+1:userpage.totalpage}&writter=${n.writter}"
                             aria-label="Next"> <span aria-hidden="true">&raquo;</span> </a></span>
                    <span style="margin-left: 10px"><a href="${pageContext.request.contextPath }/Homework/manage/articles?action=userpage&currPage=${userpage.totalpage}&writter=${n.writter}">尾页</a></span>
                </div>
                <div class="list-page"> ${userpage.currpage}/${userpage.totalpage} 页</div>
            </c:forEach>
        </div>
    </div>
</div>
<!--/main-->
</div>

<script>
    function changeable() {
        var o = document.getElementById("content");
    }

</script>
</body>
</html>
